﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using chUtils;

namespace lopet.data
{
    public class Point
    {
        public double X { get; set; }
        public double Y { get; set; }
        public double Z { get; set; }

        public Point()
        {
            X = 0;
            Y = 0;
            Z = 0;
        }

        public Point(double x, double y, double z)
        {
            X = x;
            Y = y;
            Z = z;
        }

        /// <summary>
        /// Gives points distance to another point
        /// </summary>
        /// <param name="point">Point</param>
        public double DistanceTo(Point point)
        {
            return ((Y - point.Y).Squared() + (X - point.X).Squared() +
                (Z - point.Z).Squared()).Sqrt();
        }
    }
}
